
package edu.wpi.first.wpilibj.templates;

import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.buttons.JoystickButton;  
import edu.wpi.first.wpilibj.templates.commands.ArmUp;
import edu.wpi.first.wpilibj.templates.commands.ArmDown;
import edu.wpi.first.wpilibj.templates.subsystems.Arm;
import edu.wpi.first.wpilibj.templates.subsystems.FrontRoller;
import edu.wpi.first.wpilibj.templates.commands.RollerCommand;
import edu.wpi.first.wpilibj.templates.subsystems.BallConveyor;
import edu.wpi.first.wpilibj.templates.commands.ConveyorCommand;


public class OI {
    public final static int JOYSTICK_PORT = 1;
    public final static int JOYSTICK_PORT2 = 2;
    
    public static final int ARM_UP_BUTTON = 7;
    public static final int ARM_DOWN_BUTTON = 5;
    public static final int ROLLER_BUTTON = 6;
    public static final int CONVEYOR_BUTTON = 6;
    
    private Joystick driveStick;
    private Joystick turretStick;
    
    private JoystickButton armDownButton;
    private JoystickButton armUpButton;
    
    private JoystickButton rollerButton;
    
    private JoystickButton conveyorToggle;
    
    public static Arm arm = new Arm();
    public static FrontRoller frontRoller = new FrontRoller();
    public static BallConveyor ballConveyor = new BallConveyor();
    
    public OI() {
        driveStick = new Joystick(JOYSTICK_PORT);
        turretStick = new Joystick(JOYSTICK_PORT2);
        
        // Buttons go here.
        armDownButton = new JoystickButton(driveStick, ARM_DOWN_BUTTON);
        armDownButton.whenPressed(new ArmDown());
        armUpButton = new JoystickButton(driveStick, ARM_UP_BUTTON);
        armUpButton.whenPressed(new ArmUp());
        
        rollerButton = new JoystickButton(driveStick, ROLLER_BUTTON);
        rollerButton.whenPressed(new RollerCommand());
        
        conveyorToggle = new JoystickButton(driveStick, CONVEYOR_BUTTON);
        conveyorToggle.whenPressed(new ConveyorCommand());
        
    }
    
    public Joystick getJoystick() {
        return(driveStick);
        
    }
}

